package com.eapt.dao;

import java.io.Serializable;

import com.eapt.vo.EdsLogisLine;
import com.stony.core.dao.HibernateDataAccessObject;
import com.stony.core.util.SEQUtils;

public class EdsLogisLineDAO extends HibernateDataAccessObject {

	public EdsLogisLineDAO(){

		super(EdsLogisLine.class);

	}

	protected void onDeleteTrigger(Object object) {
		super.onDeleteTrigger(object);
	}

	protected void onSaveOrUpdateTrigger(Object object) {
		super.onSaveOrUpdateTrigger(object);
	}

	protected void onSaveTrigger(Object object) {
		super.onSaveTrigger(object);
	}

	protected void onUpdateTrigger(Object object) {
		super.onUpdateTrigger(object);
	}
	
	public Long save(Serializable object) {
		EdsLogisLine vo = (EdsLogisLine) object;
		vo.setEdslogislineno(SEQUtils.getNextval("SEQ_EDS_LOGIS_LINE"));
		return super.save(vo);
	}
	
	public void saveOrUpdate(Serializable object) {
		EdsLogisLine vo = (EdsLogisLine) object;
		if (vo.getEdslogislineno() == null) {
			vo.setEdslogislineno(SEQUtils.getNextval("SEQ_EDS_LOGIS_LINE"));
		}
		super.saveOrUpdate(vo);
	}
}